
import { Schema } from "mongoose";
import { MongooseFactory } from "../kalend";

/** 用户token表 */
const schema = MongooseFactory.Schema({
    openid: {
        type: String
    },
    // 用户凭证
    appcode: {
        type: String
    },
    // 用户回话id
    session_key: {
        type: String
    },
    // 登录态
    tokencode: {
        type: String
    },
    userid:{
        type: Schema.Types.ObjectId,
        ref: "customer_account"
    },
    //备注
    remarks: {
        type: String
    }
});

export const usertokenModel = MongooseFactory.Model("usertoken", schema);